package com.jintian.smart.kernel.flowable.domain.entity;

import java.util.List;
import java.util.Map;

import com.jintian.smart.kernel.core.annotation.orm.SimpleQuery;
import com.jintian.smart.kernel.flowable.domain.model.ExecuteRuleImpl;
import com.jintian.smart.kernel.flowable.domain.model.FlowRuleImpl;
import com.jintian.smart.kernel.flowable.domain.model.TransformRuleImpl;
import com.jintian.smart.kernel.orm.entity.BaseBaseEntity;
import com.jintian.smart.kernel.orm.entity.annotation.JSONMapper;
import jakarta.validation.constraints.NotNull;
import org.beetl.sql.annotation.entity.Column;
import org.beetl.sql.annotation.entity.Table;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * MdaFlowAct entity gen at 2023-02-24
 */

@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(name = "MDA_FLOW_ACT")
@SimpleQuery("com.jintian.mda.flow.domain.query.FlowActQuery")
public class FlowAct extends BaseBaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 流程Id
     */
    @NotNull
    @Column(name = "FLOW_Id", comment = "流程Id")
    private String flowId;

    /**
     * 流程编码
     */
    @NotNull
    @Column(name = "FLOW_CODE", comment = "流程编码")
    private String flowCode;
    /**
     * 流程版本
     */
    @Column(name = "FLOW_VERSION", comment = "流程版本")
    private Integer flowVersion;
    /**
     * 环节编码
     */
    @NotNull
    @Column(name = "ACT_CODE", comment = "环节编码")
    private String actCode;
    /**
     * 环节名称
     */
    @Column(name = "ACT_NAME", comment = "环节名称")
    private String actName;

    /**
     * 业务规则
     */
    @Column(name = "BIZRULES", comment = "业务规则")
    @JSONMapper
    private List<Object> bizRules;
    /**
     * 流转规则
     */
    @Column(name = "FLOWRULES", comment = "流转规则")
    @JSONMapper
    private List<FlowRuleImpl> flowRules;
    /**
     * 执行规则
     */
    @Column(name = "EXECUTERULES", comment = "执行规则")
    @JSONMapper
    private List<ExecuteRuleImpl> executeRules;
    /**
     * 转发规则
     */
    @Column(name = "transformRules", comment = "转发规则")
    @JSONMapper
    private List<TransformRuleImpl> transformRules;
    /**
     * 任务变量
     */
    @Column(name = "TASK_ATTRIBUTES", comment = "任务属性")
    @JSONMapper
    private Map<String, String> taskAttributes;

    @Column(name = "FORM_URL", comment = "表单URL")
    private String formUrl;

    /**
     * 浪潮工作流的环节编码
     */
    @NotNull
    @Column(name = "LC_CODE", comment = "浪潮工作流的环节编码")
    private String lcCode;
}